Api.AddVariable method

Adds a user-defined variable.

Namespace: IntervalZero.KINGSTAR.Local.Api

Assembly: IntervalZero.KINGSTAR.Local.Api (in IntervalZero.KINGSTAR.Local.dll) Version: 4.4.0.0

Syntax

C#VB
public KsReturn<UserVariable> AddVariable(
       string Name,
       KsLogDataType Type,
       UserVariable Parent = null,
       long FolderSize = 0
)
Public Function AddVariable(
       Name As String,
       Type As KsLogDataType,
       Parent = null As UserVariable,
       Long As FolderSize = 0
) As KsReturn(Of UserVariable)

Parameters

Name

Type: string

The name of a variable.

 

Type

Type: KsLogDataType

The data type of a variable.

 

Parent

Type: UserVariable

Default value: null

The parent folder of UserVariable. By default, it adds variables to the root folder.

 

FolderSize

Type: long

Default value: 0

The FolderSize is used when logDirectory variable is added. By default, you can add up to 64 UserVariable.

Return value

Type: KsReturn<UserVariable>

Returns a KsError code and a user-defined variable.

Remarks

Usable EtherCAT states

ecatOffline, ecatInit, ecatBoot, ecatPreOP, ecatSafeOP, ecatOP

Examples

C#
N/A

See also

Api Class

IntervalZero.KINGSTAR.Local.Api Namespace